<!DOCTYPE html>
<!--suppress ThymeleafVariablesResolveInspection -->
<html class="x-admin-sm" xmlns:th="http://www.thymeleaf.org" lang="zh">
<head>
	<meta charset="UTF-8">
	<title>一卡通</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
	<link rel="stylesheet" href="/x-admin/css/font.css">
	<link rel="stylesheet" href="/x-admin/css/xadmin.css">
	<script src="/static/x-admin/js/jquery-3.2.1.min.js"></script>
	<!--<script src="/x-admin/js/moment-with-locales.js"></script>-->
	<script src="/x-admin/lib/layui/layui.js" charset="utf-8"></script>
	<script src="/x-admin/lib/layui-ext-lib/excel.min.js" charset="utf-8"></script>
	<script type="text/javascript" src="/x-admin/js/xadmin.js"></script>
	<script src="/x-admin/js/date-formatter.js" type="text/javascript"></script>
	<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
	<!--[if lt IE 9]>
	<script src="/x-admin/js/html5.min.js" type="text/javascript"></script>
	<script src="/x-admin/js/respond.min.js"></script>
	<![endif]-->
</head>
<body>
<div class="x-nav">
            <span class="layui-breadcrumb">
                <a href="">首页</a>
	            <!--<a href="">演示</a>-->
                <a>
                    <cite>部门营业统计</cite>
                </a>
            </span>
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
		<i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
	</a>
</div>
<div class="layui-fluid">
	<div class="layui-row layui-col-space15">
		<div class="layui-col-md12">
			<div class="layui-card">
				<div class="layui-card-body ">
					<blockquote class="layui-elem-quote">欢迎您
						<span class="x-red"></span>！
						当前时间:
						<span id="timeSpan" class="x-red"></span>
					</blockquote>
				</div>
			</div>
		</div>
		<!--数据统计-->
		<div class="layui-col-md12">
			<div class="layui-card">
				<div class="layui-card-header">查询条件</div>
				<div class="layui-card-body ">
					<form class="layui-form layui-col-space5">
						<div class="layui-inline layui-show-xs-block">
							<label for="bgDate"></label>
							<input class="layui-input" autocomplete="off" placeholder="开始日" name="bgDate" id="bgDate" th:value="${bgDate}">
						</div>
						<div class="layui-inline layui-show-xs-block">
							<label for="edDate"></label>
							<input class="layui-input" autocomplete="off" placeholder="截止日" name="edDate" id="edDate" th:value="${edDate}">
						</div>
						<div class="layui-inline layui-show-xs-block">
							<label>
								<input type="text" size="30" name="deptName" placeholder="请输入想要查询的部门(可不填)" autocomplete="off" class="layui-input">
							</label>
						</div>
						<div class="layui-inline layui-show-xs-block">
							<button class="layui-btn" lay-submit="" lay-filter="sreach">
								<!--<i class="layui-icon"></i>-->
								<i class="layui-icon">&#xe615;查询</i>
							</button>
							<button class="layui-btn" id="export">
								<!--<i class="layui-icon">&#xe615;</i>-->
								<i class="layui-icon layui-icon-export">导出</i>
							</button>
						</div>
					</form>
				</div>
				<div class="layui-card-body ">
					<ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
						<li class="layui-col-md2 layui-col-xs6" th:each="info,infoState:${maxMinBusinessVolumeList}">
							<a href="javascript:void(0)" class="x-admin-backlog-body">
								<h3 th:text="${info.groupname}"></h3>最大营业额
								<p>
									<cite th:text="${info.maxAmount}"></cite>
								</p>
							</a>
						</li>
						<li class="layui-col-md2 layui-col-xs6" th:each="info,infoState:${maxMinBusinessVolumeList}">
							<a href="javascript:void(0)" class="x-admin-backlog-body">
								<h3 th:text="${info.groupname}"></h3>最小营业额
								<p>
									<cite th:text="${info.minAmount}"></cite>
								</p>
							</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<!--部门营业统计-->
		<div class="layui-col-md12">
			<div class="layui-card">
				<div class="layui-card-header">部门营业日统计-月统计</div>
				<div class="layui-card-body ">
					<table class="layui-table">
						<thead>
						<tr>
							<th>部门</th>
							<th>日期/月份</th>
							<th>金额(元￥)</th>
							<th>次数(次)</th>
						</tr>
						</thead>
						<tbody>
						<!--suppress ThymeleafVariablesResolveInspection 把本句加在头部即可解决-->
						<tr th:each="info,infoStat : ${deptDayTurnoverSummaryList}">
							<td th:text="${info.groupname}"></td>
							<td th:text="${info.ADate}"></td>
							<th th:text="${info.AmountAllDay}"></th>
							<th th:text="${info.RvsAmountAllDay}"></th>
						</tr>
						</tbody>
					</table>
				</div>
			</div>
		</div>
		<!--部门营业明细-->
		<div class="layui-col-md12">
			<div class="layui-card">
				<div class="layui-card-header">部门营业日统计-日明细</div>
				<div class="layui-card-body ">
					<table class="layui-table">
						<thead>
						<tr style="color:#01AAED">
							<th>序号</th>
							<th>部门</th>
							<th>日期/月份</th>
							<th>金额(元￥)</th>
							<th>次数(次)</th>
						</tr>
						</thead>
						<tbody>
						<tr th:each="info,infoStat : ${deptDayTurnoverList}">
							<td th:text="${infoStat.index}"></td>
							<td th:text="${info.groupname}"></td>
							<td th:text="${info.ADate}"></td>
							<th th:text="${info.AmountAllDay}"></th>
							<th th:text="${info.RvsAmountAllDay}"></th>
						</tr>
						</tbody>
					</table>
				</div>
			</div>
		</div>
		<!--<style id="welcome_style"></style>-->
		<div class="layui-col-md12">
			<blockquote class="layui-elem-quote layui-quote-nm">感谢layui,百度Echarts,jquery,本系统由x-admin提供技术支持。</blockquote>
		</div>
	</div>
</div>
<script type="text/javascript">
	$(function(){
		setInterval(function(){
			$('#timeSpan').text(getNowTime("yyyy-MM-dd HH:mm:ss"));
		},1000);
		$('#export').onclick(function(e){
			var data = [
				{name: 'xxx', sex: '222'}
			];
			LAY_EXCEL.exportExcel(data, '表格导出.xlsx', 'xlsx');
		});
	});
</script>
<script type="text/javascript">
	layui.use('laydate',
		function(){
			var laydate = layui.laydate;
			//执行一个laydate实例
			laydate.render({
				//指定元素
				elem:'#bgDate',
				type:'datetime'
			});
			//执行一个laydate实例
			laydate.render({
				//指定元素
				elem:'#edDate',
				type:'datetime'
			});
		});
</script>
</body>
</html>